<?php
//echo "required";
//exit;

define("RelativePath", "/var/www/html/gestor/apt/php/");
define("PathToCurrentPage", "/var/www/html/gestor/apt/php/");
include("Common.php");	
	
$login = isset($_REQUEST["login"]) ? addslashes(trim($_REQUEST["login"])) : FALSE;
$senha = isset($_REQUEST["senha"]) ? addslashes(trim($_REQUEST["senha"])) : FALSE;

if(!$login){
	echo "required";
	exit;
}else{
	$db = new clsDBcpdgestor();
	$query = "SELECT  count(*) as c from parceiro_usuario where login = '".$login."' and senha = '".$senha."' ";
	$db->query($query);
	$db->next_record();
	$aux = $db->f('c');
	if( $aux > 0){
		echo "OK";
		$db->close();
		exit;
	}else{
		echo "invalido";
		//echo $aux." <das";
		$db->close();
		exit;
	}
}

?>